#! /bin/sh

# resolve links
THIS=`readlink -f $0`
THIS_DIR=`dirname ${THIS}`

HADOOP_HOME="/usr/lib/hadoop/"
HADOOP_CONF_DIR="/usr/lib/hadoop/conf/"
HBASE_CONF_DIR="/usr/lib/hbase/conf/"
THIS_CONF_DIR="${THIS_DIR}/conf/"


### job archive
MAHOUT_JOB=${THIS_DIR}/jobs/job.jar

CLASS=org.apache.mahout.driver.MahoutDriver

export HADOOP_CLASSPATH=${THIS_CONF_DIR}:${HBASE_CONF_DIR}:${HADOOP_CLASSPATH}
exec "$HADOOP_HOME/bin/hadoop" jar $MAHOUT_JOB $CLASS "$@"
